<template>
  <router-view></router-view>
</template>
<script setup name="dataIntergrate">
import useTagsViewStore from '@/store/modules/tagsView'
const tagsViewStore = useTagsViewStore()
const { visitedViews } = storeToRefs(tagsViewStore)
watch(visitedViews, () => {
  let curMenu = '/businessManage/dataIntegrate/main'
  let dataIntegrateNum = visitedViews.value.filter(item => item.path.includes(curMenu)).length
  let newVisitedViews = visitedViews.value.slice(0, -1)
  if (dataIntegrateNum > 1) {
    newVisitedViews.map((item) => {
      if (item.path.includes(curMenu)) {
        tagsViewStore.delView(item)
      }
    })
  }
}, { deep: true })
</script>